package com.aps.entity.domain.order;

import java.util.Date;

import javax.persistence.*;

import com.aps.entity.domain.BaseEntity;
import com.aps.entity.eunm.*;
import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author liaoguangan
 * @description <订单>
 * @date 2018/4/1 15:00
 */

@Table(name = "aps_order")
@Entity
@Data
@ApiModel
public class ApsOrder extends BaseEntity {

    @Column
    @ApiModelProperty("订单号")
    private String orderNum;

    @Column
    @ApiModelProperty("订单时间")
    private Date orderTime;

    @Column
    @ApiModelProperty("订单类型")
    @Enumerated(EnumType.STRING)
    private OrderType orderType;

    @Column
    @ApiModelProperty("订单上菜要求")
    @Enumerated(EnumType.STRING)
    private OrderDishType ospReq;

    @Column
    @ApiModelProperty("客户等级")
    @Enumerated(EnumType.STRING)
    private ConsumerType cstmrType;

    @Column
    @ApiModelProperty("是否预约订单")
    private Boolean isAppt;

    @Column
    @ApiModelProperty("是否加急")
    private Boolean urgent;

    @Column
    @ApiModelProperty("是否hold单")
    private Boolean isOrdHold;

    @Column
    @ApiModelProperty("hold单时间")
    private Date holdTime;

    @Column
    @ApiModelProperty("台号")
    private String tableNum;

    @Column
    @ApiModelProperty("订单状态")
    @Enumerated(EnumType.STRING)
    private OrderStatus status;

    @Column
    @ApiModelProperty("记录退菜和换菜时的状态")
    @Enumerated(EnumType.STRING)
    private DishStatus dishStatus;

    @JsonIgnore
    @Transient
    //优先级
    private Integer priority;

}
